package com.ssy.lingxi.member.merchant.api.fallback.inner;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.feign.inner.MemberAbilitySalesFeign;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberSalesCountFeignVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberSalesFindMemberVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberSalesFindUserIdVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.response.*;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;

/**
 * 业务员业绩统计查询内部Feign接口Fallback类
 *
 * @author 郑小翠
 * @version 2.02.18
 * @date 2022-03-14
 */
@Component
public class MemberAbilitySalesControllerFallback implements MemberAbilitySalesFeign {

    /**
     * 业绩统计
     *
     * @param pageVO 接口参数
     * @return 返回符合条件的业务员列表和下级会员
     */
    @Override
    public Wrapper<PageData<MemberFeignSalesCountVO>> memberSalesList(@Valid MemberSalesCountFeignVO pageVO) {
        throw new BusinessException(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 获取角色类型为消费者的角色Id
     *
     * @return 返回角色类型为消费者的角色Id
     */
    @Override
    public Wrapper<List<Long>> roleIds() {
        throw new BusinessException(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据业务员Id查询下级会员信息
     *
     * @param pageVO 查询条件
     * @return 返回下级会员信息
     */
    @Override
    public Wrapper<PageData<MemberSalesFeignPageQueryVO>> findByUserId(@Valid MemberSalesFindUserIdVO pageVO) {
        throw new BusinessException(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据当前账号以及搜索条件查找下级渠道会员
     *
     * @param pageVO 查询条件
     * @return 返回业务员和下级会员信息
     */
    @Override
    public Wrapper<List<MemberSalesFindMemberQueryVO>> findMemberSales(@Valid MemberSalesFindMemberVO pageVO) {
        throw new BusinessException(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据数据权限找出符合条件的业务员信息Id
     *
     * @param pageVO 查询条件
     * @return 返回业务员Id和业务员姓名
     */
    @Override
    public Wrapper<List<MemberUserVO>> getUserIds(@Valid MemberSalesCountFeignVO pageVO) {
        throw new BusinessException(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

}
